package com.caochenlei.graph;

public class CycleTest {
    public static void main(String[] args) {
        Graph G = new Graph(3);
        G.addEdge(0, 1);
        G.addEdge(0, 2);
        G.addEdge(1, 2);
        Cycle cycle = new Cycle(G);
        System.out.println("是否有环：" + cycle.hasCycle());
        System.out.println("====================");
        System.out.println(G);
    }
}
